package com.example.spirngtest.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.spirngtest.dao.DemoDAO;
import com.example.spirngtest.domain.DemoData;
import com.example.spirngtest.service.DemoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: cet-practice
 * @description:
 * @author: 陈恩涛
 * @create: 2023-06-19 23:08
 **/

@Service
public class DemoServiceImpl extends ServiceImpl<DemoDAO, DemoData> implements DemoService {

    @Override
    public List<DemoData> getAll() {
        return list();
    }

    @Override
    public DemoData getByString(String string) {
        return lambdaQuery().eq(DemoData::getString, string).one();
    }
}
